package com.yan.plugin;

import com.baomidou.kisso.web.WebKissoConfigurer;
import com.jfinal.plugin.IPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by Administrator on 2016/12/26 0026.
 */
public class KissoJFinalPlugin implements IPlugin {
    private static final Logger logger = LoggerFactory
            .getLogger(KissoJFinalPlugin.class);

    // 开始
    public boolean start() {
        /* 进行初始化 */
        WebKissoConfigurer webKissoConfigurer = new WebKissoConfigurer(
                "sso.properties");
        webKissoConfigurer.setRunMode("test_mode");
        webKissoConfigurer.initKisso();
        logger.info("插件初始化完成!");
        return true;

    }

    // 结束
    public boolean stop() {
        logger.info("插件销毁!");
        return true;
    }

}